1. Field of the Invention
The present invention relates to a method and an apparatus for quantifying a sense of contrast of an image perceived by a viewer and for carrying out image processing on image data based on the sense of contrast having been quantified. The present invention also relates to a computer-readable recording medium storing a program to cause a computer to execute the image processing method.
2. Description of the Related Art
Reproduction of digital image data obtained by a digital camera or by reading an image recorded on a film as a softcopy on a display device or a hardcopy such as a print has been carried out. In the case where digital image data are reproduced as has been described above, various kinds of image processing such as tone processing and frequency processing has been carried out on image data so as to cause the quality of the reproduced image to be as high as that of a print generated from a negative film.
For example, a histogram of image data is generated and contrast of an image represented by the image data is found by a distribution width of the histogram. By correcting a tone curve for converting a tone of the image data based on the contrast having been found, the image data are converted so that a tone does not become flat or noise becomes inconspicuous. Various kinds of such image processing methods have been proposed (Japanese Unexamined Patent Publication No. 6(1994)-253176, for example). The contrast here means a ratio of a dark portion of an image to a light portion of the image. Therefore, the contrast of an image can be judged by the distribution width of a histogram. If the histogram distribution width is wide, the image has sharp contrast while the image has weak contrast if the distribution width is narrow. For example, an image obtained by photographing in fine weather has a wide histogram reflecting a dark portion in the shade and a light portion in the sunlight. If an image is obtained by photographing in cloudy weather, the histogram becomes narrow due to poor distinction between the sunlight and shade.
Another image processing method for quantifying a sense of sharpness or graininess of an image perceived by a viewer and for changing the content of image processing based on the sense of contrast having been quantified in order to generate a preferable image has also been proposed (Japanese Unexamined Patent Publication No. 7(1995)-193766).
The histogram generated from image data has a complex shape since the histogram includes various kinds of information of all subjects or every detail in an image. Therefore, information of the contrast perceived by a viewer of the image is buried in the complex shape, and the histogram does not necessarily reflect the viewer's sense of contrast. For example, in the case of an image having a human face as a subject thereof, a viewer of the image perceives the contrast only in the face and not for subjects other than the face in the image. However, since a histogram generated from image data includes information regarding the subjects other than the face, this histogram does not reflect the contrast perceived by the viewer. Therefore, if image processing is carried out on the image data based on such a histogram, a processed image desired by the viewer is not necessarily obtained.
The sense of contrast perceived by a viewer becomes different between the cases of sharp colors and dull colors included in an image. For example, an image having sharp colors therein is perceived as an image having sharp contrast while an image including colors which are not so sharp is perceived as an image having weak contrast. Therefore, since the sense of contrast becomes different due to colors included in an image, image processing considering the colors of an image needs to be carried out.
The present invention has been conceived based on consideration of the above problems. An object of the present invention is therefore to provide a method and an apparatus for quantifying a sense of contrast perceived by a viewer of an image and for carrying out adequate image processing on the image based on the sense of contrast, and also to provide a computer-readable recording medium storing a program to cause a computer to execute the image processing.
Another object of the present invention is to provide a method and an apparatus for carrying out adequate image processing on an image by using color information of the image, and also to provide a computer-readable recording medium storing a program to cause a computer to execute the image processing.